Email - Gmail Module
The Email - Gmail Module provides a communication channel between Resolve Actions Express and Gmail. Once the Gmail Module is configured and available, it can read and send emails using the Gmail service.
Actions Express can use two types of connection authentication with Gmail - Basic or OAuth 2.0.
OAuth 2.0 is used in the Connection Parameter settings of the Gmail Module for better security and all requests to the Gmail API must be authorized by an authenticated user. Gmail uses the OAuth 2.0 protocol for authenticating a Google account and authorizing access to user data.
Adding the Email - Gmail Module
- Go to Main Menu > Configuration > Modules.
- From the top right corner of Integrations, click +.
The module properties screen appears. - In the Name field, enter a name for the new module.
It is a good practice to provide a descriptive name to let you distinguish between multiple modules of the same type. - In the Description field, enter a description for the module.
- From the Type field, select email - Gmail.
- In Mode, select where you want the module to run:
- Local—The module will run in your local deployment of Actions Express. This option is suitable for integration with services that run in the same network or cloud services that are accessible from the network.
- Remote—The module will run on the server where you installed the remote executor (installing a remote executor is needed when the server does not have access to the SQL DB). This option is suitable for integration with services that run in a separate network and are normally not accessible from the main network where Actions Express runs.
- Check Monitor if you want Actions Express to monitor the module.
By selecting this option, a new incident is created when the module is down. - Click Save.
Configuring the Connection Parameters
With Basic Authentication
Prerequisites
- Only personal Google accounts can work with basic authentication.
- Your personal Google account must have 2-Step Verification turned on.
- You must generate an App Password as explained at Sign in with App Passwords.
Procedure
- Click Connection Parameters.
- Select the Basic radio button.
- In the Name field, enter a "From" name that will appear on emails sent by the module.
- In the User name field, enter the Gmail address.
- In the Password field, enter the generated App Password.
- Click Test Connection to verify your connection with the server.
A valid connection is indicated with a green tick icon.
With OAuth Authentication
Prerequisites
- OAuth requires a Google Workspace account.
- Generate a JSON file with credentials. For more information, see Configuring Google for Email - Gmail.
Procedure
- Click Connection Parameters.
- Select the OAuth2 radio button.
- In Email Address, enter the email address that you want to appear as a "From" email address on emails sent by the module.
- In Credentials, click the Browse button to find and load the generated JSON file.
- Click Test Connection to verify your connection with the server.
A valid connection is indicated with a green tick icon.
Check Delete email after reading box if you don’t want to keep processed emails as history. The deleted emails go to the Gmail Bin.
Configuring Google for Email - Gmail
Before you configure the Email - Gmail integration module in Actions Express, you need to set up OAuth authentication in your Google Workspace application.
Take these steps to set up OAuth in Google Workspace:
- Go to the Google API Console and create a new project.
- In the project, enable the Gmail API using these steps.
- Create a Service Account using these steps:
- For Role, select Project > Owner.
- When creating the key, generate it in JSON format and store it on your computer.
- Set up domain-wide delegation using these steps:
- When populating OAuth scopes, use the following value:
https://mail.google.com
This entry gives Actions Express access only to the mail Google API, ensuring other Google APIs are not accessible.
- When populating OAuth scopes, use the following value:
Enabling POP Mailbox Access
Actions Express connects to your Gmail inbox via POP.
To enable this:
- Open Gmail and click the gear icon in the top-right corner.
- Select See All Settings.
- Navigate to the Forwarding and POP/IMAP tab.
- Under POP download, choose Enable POP for all mail.